package model;

import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;

import org.simpleframework.xml.*;

import utils.DateUtils;

@Root
public class Year {
	@ElementList(inline=true)
	private List<Month> monthList;

	@Attribute
	private int idY;

	public Year() {
	    super();
	}  
	
	public Year(int idY) throws ParseException{
		this.idY = idY;
		this.monthList = new ArrayList<Month>(12);
		for (int i=0;i<12;i++){
			monthList.add(new Month(DateUtils.monthInt2String(i),idY));
		}
	}
	
    public Year(List<Month> month, int idY) {
	    this.monthList = month;
	    this.idY = idY;
	}

	public List<Month> getMonth() {
		return monthList;
	}

	public void setMonth(List<Month> monthList) {
		this.monthList = monthList;
	}

	public int getIdY() {
		return idY;
	}

	public void setIdY(int idY) {
		this.idY = idY;
	}
	
	    
    
}
